package com.recharge.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.recharge.common.result.ResultDO;
import com.recharge.core.entity.MerchantAccountEntity;
import com.recharge.domain.query.MerchantAccountQueryDO;
import com.recharge.domain.vo.MerchantAccountDO;

/**
 * <p>
 *  商家帐户服务类
 * </p>
 *
 * @author reagan
 * @since 2020-08-19
 */
public interface MerchantAccountService extends IService<MerchantAccountEntity> {

    /**
     * 添加商家帐户
     * @param merchantId
     * @return ResultDO
     */
    public ResultDO add(String merchantId);

    /**
     *　编辑商家帐户
     * @param domain
     * @return ResultDO
     */
    public ResultDO edit(MerchantAccountDO domain);


    /**
     *
     * @param id
     * @param amount
     * @return
     */
    public ResultDO editBalance(String id, Long amount);

    /**
     *
     *
     * @return
     */
    public void syncMerchantAccount();

    /**
     * 添加信用金与信用还款
     * @param id 主键ID
     * @param amount 长期信用金
     * @param noAmount 临时信用金
     * @return
     */
    public ResultDO addCredit(String id, Long amount, Long noAmount);

    /**
     * 返回商家帐户
     * @param id
     * @return ResultDO
     */
    public ResultDO get(String id);


    /**
     * 获取全部商户列表
     *
     * @return ResultDO
     */
    public ResultDO listall();


    /**
     * 删除商家帐户
     * @param id
     * @param modifier
     * @return ResultDO
     */
    public ResultDO remove(String id, String modifier);

    /**
     * 查询商家帐户
     * @param domain
     * @return ResultDO
     */
    public ResultDO find(MerchantAccountQueryDO domain);
}
